/*
 * EvaluateActivity.java
 * business
 *
 * Created by SunDing on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.service.feedback;

import android.app.Activity;
import android.content.Intent;

import com.yidiandao.business.R;
import com.yidiandao.business.base.BaseActivity;
import com.yidiandao.business.utils.ActivityUtils;

/** 评价我们 意见反馈 */
public class FeedbackActivity extends BaseActivity {

    private FeedbackFragment mEvaluateFragment;

    public static void actionStart(Activity activity) {
        Intent intent = new Intent(activity, FeedbackActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void initFragment() {

        mEvaluateFragment =
                (FeedbackFragment)
                        getSupportFragmentManager().findFragmentById(R.id.container_feedback);
        if (mEvaluateFragment == null) {
            mEvaluateFragment = FeedbackFragment.getInstance();
            ActivityUtils.addFragmentToActivity(
                    getSupportFragmentManager(), mEvaluateFragment, R.id.container_feedback);
        }
    }

    @Override
    protected void initPresenter() {
        new FeedbackPresenter(mEvaluateFragment);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_feedback;
    }
}
